﻿using ConfigCreate.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConfigCreate
{
    /// <summary>
    /// 选择文件对话框控件
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class CreateOpenFileAttribute : CreateBaseAttribute
    {
        /// <summary>
        /// 选择文件对话框控件
        /// </summary>
        /// <param name="header_name">大类别名</param>
        /// <param name="group_name">组名</param>
        /// <param name="title">控件标题</param>
        public CreateOpenFileAttribute(string header_name, string group_name, string title) : base(header_name, group_name, title)
        { }

        /// <summary>
        /// 对话框标题
        /// </summary>
        public string? DialogTitle { get; set; }
        /// <summary>
        /// 对话框选择文件类型配置
        /// </summary>
        public string? DialogFilter { get; set; }
        /// <summary>
        /// 是否为多选文件（单选模式绑定字符串，多选模式绑定List&lt;string&gt;）
        /// </summary>
        public bool IsMultiselect { get; set; }
        /// <summary>
        /// 控件中文本框是否为只读模式
        /// </summary>
        public bool IsReadonly { get; set; }
    }
}
